import React, { PureComponent } from 'react'

export class App extends PureComponent {
  constructor() {
    super()
    this.state = {
      background: 'pink'
    }
  }
  render() {
    const { background } = this.state
    return (
      <div>
        <h2 style={{ fontSize: '26px', color: 'red', border: '1px solid red', background }}>我是标题</h2>
        <p>我是内容</p>
      </div>
    )
  }
}

export default App